<template>
    <ul v-infinite-scroll="load" style="overflow: auto;">
        <li v-for="hotel in count" :key="hotel">{{ hotel }}</li>
    </ul>
</template>

<script setup>
import { ref, getCurrentInstance, onMounted } from 'vue'

const { proxy } = getCurrentInstance()
proxy.$emitter.on("search", e => console.log(e))

const hotels = ref([
    {
        previewUrl: "",
        name: "",
        desc: "",
        rate: 0,
        price: 0,
    }
])

const count = ref(0)

const load = () => {
    count.value += 2
}
</script>

<style scoped></style>